if (!this.hasPendingMessages) {
this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null);
} else {
+ const cancellable = this._cancellable;
let signalId = this.connect('no-more-messages', () => {
this.disconnect(signalId);
- this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null);
+ if (!cancellable.is_cancelled())
+ this._userVerifier.call_answer_query(serviceName, answer, cancellable, null);
});
}
}
if (!this.hasPendingMessages) {
this._retry();
} else {
+ const cancellable = this._cancellable;
let signalId = this.connect('no-more-messages', () => {
this.disconnect(signalId);
- if (this._cancellable && !this._cancellable.is_cancelled())
+ if (!cancellable.is_cancelled())
this._retry();
});
}
if (!this.hasPendingMessages) {
this._cancelAndReset();
} else {
+ const cancellable = this._cancellable;
let signalId = this.connect('no-more-messages', () => {
this.disconnect(signalId);
- this._cancelAndReset();
+ if (!cancellable.is_cancelled())
+ this._cancelAndReset();
});
}
}